package test.ground.monitor;

import com.wang.tool.monitor.InvokeTemplate;
import com.wang.tool.monitor.aop.Monitor;
import com.wang.tool.monitor.template.MonitorInvoker;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author shaopeng
 * @date 2023/3/12
 */
public class MC<T extends ServiceA.Result> {


    @RequestMapping("/t2")
    @Monitor
    public T t2(String k) throws InterruptedException {
        InvokeTemplate.monitor("MonitorC", "t2233", new MonitorInvoker<Integer>() {
            @Override
            public Integer internalCall() throws Throwable {
                return 2;
            }
        });
        return null;
    }
}
